package cunostinte;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

public class Main {
	
	/**
	 * @param args
	 * @throws IOException 
	 */
	public static void main(String[] args) throws IOException {
		List<Record> oameni=new ArrayList<Record>();
		try {
			BufferedReader in = new BufferedReader(new FileReader("scenariu.txt"));
			String line;
			while((line = in.readLine())!=null){
				Record newRecord = ScenarioAnalzer.parseLine(line);
				if (newRecord.getActiune().equals("")){}
				else oameni.add(newRecord);
			}			
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		System.out.println(oameni);
		FactsWriter.writeFacts(oameni);
	}
	
	

}
